home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / systems / atari / birkhahn-metafont-packed-disks / mf27-2_2e-disk2.zoo / environ.lzh / ENVIRON.DOC < prev    next >
Text File  |  1989-06-29  |  2KB  |  45 lines

  1. ENVIRON.PRG
  2.  - set desktop environment (like PATH, HOME, and other things for shells)
  3.  from \AUTO folder.
  4.  
  5.     Place ENVIRON.PRG in the \AUTO folder.
  6.  
  7.     Uses ENVIRON.DAT as a standard ASCII text file containing the
  8.     environment (e.g try "printenv >c:\environ.dat" and use that
  9.     after fixing the PATH= as shown below).
  10.  
  11.     Note that GEM can find .RSC files on the first entry in the path,
  12.     but ignores the first character, e.g. the following works:
  13.  
  14. Note | the extra semicolon, and that you need semicolons and not commas
  15.      |         for the PATH to work for the desktop and .rsc files.
  16.      v
  17. PATH=;d:\gemprogs;d:;d:\bin;d:\lang;d:\scripts;d:\usrbin;.
  18. TEMP=c:\tmp\
  19. INCLUDE=d:\include\
  20.  
  21.     All my .rsc files (and some configs and such) are in my d:\gemprogs,
  22.     so I can double click a document (installed as per the desktop
  23.     dialog, e.g. .DOC=1stword) anywhere on any disk and the program
  24.     will come up properly, and I can go "gem program doc" from any
  25.     folder under a shell and everything will work.
  26.     
  27.     (Tech note: It is documented somewhere that the way GEM searches
  28.     for the .RSC files (and there is a call that looks for files
  29.     in the same way for setups, etc.) is to first search the current
  30.     directory, then the root directory on the disk, then the PATH=
  31.     value, which defaults to A:, which is why it spins your floppy
  32.     before it says it can't find the resource.  What my program does
  33.     is to read in environ.dat (must be in root), change linefeeds
  34.     to nulls and delete the carriage returns and put nulls at the
  35.     end, then point the desktop environment to that buffer.)
  36.  
  37.     What is also useful is that most shells will take these values
  38.     so you don't have to have a big profile.sh or login.sh files
  39.     just to set the environment.
  40.  
  41.     Make sure all lines are of the form SYM=value, and don't put
  42.     any blank lines or spaces unless needed (see your shell docs).
  43.  
  44.     Source is included for the curious.
  45.